-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: i18n for module + github action for build check
- Loading branch information
Showing
38 changed files
with
927 additions
and
836 deletions.
There are no files selected for viewing
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,37 @@ | ||
name: CI/CD check | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Run prettier test | ||
run: yarn format:check | ||
|
||
# - name: Run the tests and generate coverage report | ||
# run: yarn test | ||
|
||
- name: Build | ||
run: yarn build |
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 |
---|---|---|
|
@@ -10,7 +10,8 @@ package-lock.json | |
|
||
# production | ||
/build | ||
|
||
/**/build | ||
/prod-build | ||
.github/ | ||
/public | ||
.min.js | ||
|
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 |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import React from 'react' | ||
import React from "react"; | ||
import { Button } from "native-base"; | ||
|
||
const ButtonHOC = ({children, ...rest}) => { | ||
const ButtonHOC = ({ children, ...rest }) => { | ||
return <Button {...rest}>{children}</Button>; | ||
}; | ||
|
||
return <Button {...rest}>{children}</Button> | ||
} | ||
|
||
export default ButtonHOC | ||
export default ButtonHOC; |
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 |
---|---|---|
@@ -1,20 +1,20 @@ | ||
import React from 'react' | ||
import React from "react"; | ||
import { Center } from "native-base"; | ||
|
||
const FourOFour = () => { | ||
return ( | ||
<Center flex={1} px="3"> | ||
<Center | ||
height={200} | ||
width={{ | ||
base: 200, | ||
lg: 400, | ||
}} | ||
> | ||
404 | ||
<Center | ||
height={200} | ||
width={{ | ||
base: 200, | ||
lg: 400, | ||
}} | ||
> | ||
404 | ||
</Center> | ||
</Center> | ||
</Center> | ||
) | ||
} | ||
); | ||
}; | ||
|
||
export default FourOFour | ||
export default FourOFour; |
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 |
---|---|---|
@@ -1,70 +1,69 @@ | ||
import React from 'react' | ||
import React from "react"; | ||
import { Box } from "native-base"; | ||
import { IconByName } from "@shiksha/common-lib"; | ||
|
||
export const GetIcon = ({ status, _box, color, _icon, type }) => { | ||
let icon = <></>; | ||
let iconProps = { fontSize: "xl", isDisabled: true, ..._icon }; | ||
switch (status) { | ||
case "Present": | ||
icon = ( | ||
<Box {..._box} color={color ? color : "present.500"}> | ||
<IconByName | ||
name={type === "Send" ? "MailFillIcon" : "MailForbidFillIcon"} | ||
p="5px" | ||
rounded="full" | ||
_icon={{ size: "14" }} | ||
bg={status.toLowerCase() + ".100"} | ||
{...iconProps} | ||
/> | ||
</Box> | ||
); | ||
break; | ||
case "Absent": | ||
icon = ( | ||
<Box {..._box} color={color ? color : "absent.500"}> | ||
<IconByName | ||
name={type === "Send" ? "MailFillIcon" : "MailForbidFillIcon"} | ||
p="5px" | ||
rounded="full" | ||
_icon={{ size: "14" }} | ||
bg={status.toLowerCase() + ".100"} | ||
{...iconProps} | ||
/> | ||
</Box> | ||
); | ||
break; | ||
case "Holiday": | ||
icon = ( | ||
<Box {..._box} color={color ? color : "attendanceUnmarked.100"}> | ||
<IconByName name="CheckboxBlankCircleLineIcon" {...iconProps} /> | ||
</Box> | ||
); | ||
break; | ||
case "Unmarked": | ||
icon = ( | ||
<Box {..._box} color={color ? color : "attendanceUnmarked.500"}> | ||
<IconByName name="CheckboxBlankCircleLineIcon" {...iconProps} /> | ||
</Box> | ||
); | ||
break; | ||
case "Today": | ||
icon = ( | ||
<Box {..._box} color={color ? color : "attendanceUnmarked.500"}> | ||
<IconByName name="CheckboxBlankCircleLineIcon" {...iconProps} /> | ||
</Box> | ||
); | ||
break; | ||
default: | ||
icon = ( | ||
<Box {..._box} color={color ? color : "attendanceUnmarked.400"}> | ||
<IconByName name={status} {...iconProps} /> | ||
</Box> | ||
); | ||
break; | ||
} | ||
return icon; | ||
}; | ||
|
||
let icon = <></>; | ||
let iconProps = { fontSize: "xl", isDisabled: true, ..._icon }; | ||
switch (status) { | ||
case "Present": | ||
icon = ( | ||
<Box {..._box} color={color ? color : "present.500"}> | ||
<IconByName | ||
name={type === "Send" ? "MailFillIcon" : "MailForbidFillIcon"} | ||
p="5px" | ||
rounded="full" | ||
_icon={{ size: "14" }} | ||
bg={status.toLowerCase() + ".100"} | ||
{...iconProps} | ||
/> | ||
</Box> | ||
); | ||
break; | ||
case "Absent": | ||
icon = ( | ||
<Box {..._box} color={color ? color : "absent.500"}> | ||
<IconByName | ||
name={type === "Send" ? "MailFillIcon" : "MailForbidFillIcon"} | ||
p="5px" | ||
rounded="full" | ||
_icon={{ size: "14" }} | ||
bg={status.toLowerCase() + ".100"} | ||
{...iconProps} | ||
/> | ||
</Box> | ||
); | ||
break; | ||
case "Holiday": | ||
icon = ( | ||
<Box {..._box} color={color ? color : "attendanceUnmarked.100"}> | ||
<IconByName name="CheckboxBlankCircleLineIcon" {...iconProps} /> | ||
</Box> | ||
); | ||
break; | ||
case "Unmarked": | ||
icon = ( | ||
<Box {..._box} color={color ? color : "attendanceUnmarked.500"}> | ||
<IconByName name="CheckboxBlankCircleLineIcon" {...iconProps} /> | ||
</Box> | ||
); | ||
break; | ||
case "Today": | ||
icon = ( | ||
<Box {..._box} color={color ? color : "attendanceUnmarked.500"}> | ||
<IconByName name="CheckboxBlankCircleLineIcon" {...iconProps} /> | ||
</Box> | ||
); | ||
break; | ||
default: | ||
icon = ( | ||
<Box {..._box} color={color ? color : "attendanceUnmarked.400"}> | ||
<IconByName name={status} {...iconProps} /> | ||
</Box> | ||
); | ||
break; | ||
} | ||
return icon; | ||
}; | ||
|
||
export default GetIcon | ||
export default GetIcon; |
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 |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import React from 'react' | ||
import React from "react"; | ||
import { Link, useParams } from "react-router-dom"; | ||
|
||
const LinkHOC = ({children, ...rest}) => { | ||
|
||
return <Link {...rest}>{children}</Link> | ||
} | ||
const LinkHOC = ({ children, ...rest }) => { | ||
return <Link {...rest}>{children}</Link>; | ||
}; | ||
|
||
export default LinkHOC | ||
export default LinkHOC; |
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 |
---|---|---|
@@ -1,45 +1,33 @@ | ||
import React from 'react' | ||
import { | ||
Center, | ||
Heading, | ||
HStack, | ||
Spinner, | ||
Text, | ||
VStack, | ||
} from "native-base"; | ||
import React from "react"; | ||
import { Center, Heading, HStack, Spinner, Text, VStack } from "native-base"; | ||
|
||
|
||
const Loader = ({success, fail}) => { | ||
const Loader = ({ success, fail }) => { | ||
return ( | ||
<Center flex={1} px="3"> | ||
<Center | ||
_text={{ | ||
color: "white", | ||
fontWeight: "bold", | ||
}} | ||
height={200} | ||
width={{ | ||
base: 200, | ||
lg: 400, | ||
}} | ||
> | ||
<VStack space={2} alignItems={"center"}> | ||
<Text> | ||
{success ? success : ""} | ||
</Text> | ||
<Text> | ||
{fail ? fail : ""} | ||
</Text> | ||
<HStack space={2} alignItems="center"> | ||
<Spinner accessibilityLabel="Loading posts" /> | ||
<Heading color="primary.500" fontSize="md"> | ||
Loading | ||
</Heading> | ||
</HStack> | ||
</VStack> | ||
<Center | ||
_text={{ | ||
color: "white", | ||
fontWeight: "bold", | ||
}} | ||
height={200} | ||
width={{ | ||
base: 200, | ||
lg: 400, | ||
}} | ||
> | ||
<VStack space={2} alignItems={"center"}> | ||
<Text>{success ? success : ""}</Text> | ||
<Text>{fail ? fail : ""}</Text> | ||
<HStack space={2} alignItems="center"> | ||
<Spinner accessibilityLabel="Loading posts" /> | ||
<Heading color="primary.500" fontSize="md"> | ||
Loading | ||
</Heading> | ||
</HStack> | ||
</VStack> | ||
</Center> | ||
</Center> | ||
</Center> | ||
) | ||
} | ||
); | ||
}; | ||
|
||
export default Loader | ||
export default Loader; |
Oops, something went wrong.