-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: save release version and remove saved product if the release ch…
…anges (#899) * 1.0.0 * feat: remove saved product if release version changes
- Loading branch information
1 parent
1a42d54
commit cf9aa40
Showing
10 changed files
with
76 additions
and
64 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { CONFIG } from "lib/config"; | ||
|
||
import { getItemFromStorage, saveItemInStorage } from "./hooks/useLocalStorage"; | ||
|
||
export const didReleaseVersionChange = (): boolean => { | ||
const releaseVersion = getItemFromStorage("release-version", undefined); | ||
const currentReleaseVersion = CONFIG.releaseTag; | ||
return releaseVersion !== currentReleaseVersion; | ||
}; | ||
|
||
export const saveCurrentReleaseVersion = (): void => { | ||
const currentReleaseVersion = CONFIG.releaseTag; | ||
if (currentReleaseVersion) { | ||
saveItemInStorage("release-version", currentReleaseVersion); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { RouteProps } from "react-router"; | ||
|
||
export type IRoutes = RouteProps & { | ||
component: | ||
| React.ComponentType<any> // eslint-disable-line | ||
| React.LazyExoticComponent<React.ComponentType<any>>; // eslint-disable-line | ||
role: Array<string | null>; | ||
componentProps?: { | ||
[key: string]: string; | ||
}; | ||
app?: { | ||
withLayout?: boolean; | ||
withFullLayout?: boolean; | ||
withFooter?: boolean; | ||
fluidHeader?: boolean; | ||
}; | ||
}; |