File tree Expand file tree Collapse file tree 11 files changed +146
-1
lines changed Expand file tree Collapse file tree 11 files changed +146
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on :
4
+ push :
5
+ branches : [develop]
6
+
7
+ jobs :
8
+ build :
9
+ runs-on : ubuntu-latest
10
+
11
+ steps :
12
+ - uses : actions/checkout@v4
13
+
14
+ - name : setup node js
15
+ uses : actions/setup-node@v4
16
+ with :
17
+ node-version : 18.18.x
18
+
19
+ - run : npm install
20
+
21
+ - name : Create .env file
22
+ run : |
23
+ touch .env
24
+ echo VITE_API_URL=${{ secrets.DEV_VITE_API_URL }} >> .env
25
+ cat .env
26
+
27
+ - run : npm run build
28
+
29
+ - uses : aws-actions/configure-aws-credentials@v1
30
+ with :
31
+ aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
32
+ aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
33
+ aws-region : sa-east-1
34
+ - run : aws s3 sync ./dist s3://dev.sos-rs.com
Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on :
4
+ push :
5
+ branches : [staging]
6
+
7
+ jobs :
8
+ build :
9
+ runs-on : ubuntu-latest
10
+
11
+ steps :
12
+ - uses : actions/checkout@v4
13
+
14
+ - name : setup node js
15
+ uses : actions/setup-node@v4
16
+ with :
17
+ node-version : 18.18.x
18
+
19
+ - run : npm install
20
+
21
+ - name : Create .env file
22
+ run : |
23
+ touch .env
24
+ echo VITE_API_URL=${{ secrets.STG_VITE_API_URL }} >> .env
25
+ cat .env
26
+
27
+ - run : npm run build
28
+
29
+ - uses : aws-actions/configure-aws-credentials@v1
30
+ with :
31
+ aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
32
+ aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
33
+ aws-region : sa-east-1
34
+ - run : aws s3 sync ./dist s3://stg.sos-rs.com
Original file line number Diff line number Diff line change 3
3
CircleHelp ,
4
4
CirclePlus ,
5
5
DoorOpen ,
6
+ HeartHandshake ,
6
7
Info ,
7
8
LinkIcon ,
8
9
Menu ,
@@ -65,6 +66,11 @@ const BurgerMenu = () => {
65
66
link = "/politica-de-privacidade"
66
67
icon = { < Info className = "w-4 h-4" /> }
67
68
/>
69
+ < BurguerMenuItem
70
+ label = "Apoiadores"
71
+ link = "/apoiadores"
72
+ icon = { < HeartHandshake className = "w-4 h-4" /> }
73
+ />
68
74
< Separator />
69
75
{ partners . length > 0 && (
70
76
< Fragment >
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { useViaCep } from './useViaCep';
11
11
import { usePartners } from './usePartners' ;
12
12
import { useGithubContributors } from './useGithubContributors' ;
13
13
import { useAuthRoles } from './useAuthRoles' ;
14
+ import { useSupporters } from './useSupporters' ;
14
15
15
16
export {
16
17
useShelters ,
@@ -26,4 +27,5 @@ export {
26
27
usePartners ,
27
28
useGithubContributors ,
28
29
useAuthRoles ,
30
+ useSupporters ,
29
31
} ;
Original file line number Diff line number Diff line change
1
+ import { useSupporters } from './useSupporters' ;
2
+
3
+ export { useSupporters } ;
Original file line number Diff line number Diff line change
1
+ export interface ISupporter {
2
+ id : string ;
3
+ name : string ;
4
+ imageUrl : string ;
5
+ link : string ;
6
+ createdAt : string ;
7
+ updatedAt ?: string | null ;
8
+ }
Original file line number Diff line number Diff line change
1
+ import { useFetch } from '../useFetch' ;
2
+ import { ISupporter } from './types' ;
3
+
4
+ const useSupporters = ( ) => {
5
+ return useFetch < ISupporter [ ] > ( '/supporters' , {
6
+ initialValue : [ ] ,
7
+ cache : true ,
8
+ } ) ;
9
+ } ;
10
+
11
+ export { useSupporters } ;
Original file line number Diff line number Diff line change
1
+ import { BurgerMenu , Header , LoadingScreen } from '@/components' ;
2
+ import WithTooltip from '@/components/ui/with-tooltip' ;
3
+ import { useSupporters } from '@/hooks' ;
4
+ import { Link } from 'react-router-dom' ;
5
+
6
+ const Supporters = ( ) => {
7
+ const { data : supporters , loading } = useSupporters ( ) ;
8
+
9
+ if ( loading ) return < LoadingScreen /> ;
10
+
11
+ return (
12
+ < div className = "flex flex-col h-screen items-center bg-gray-50 overflow-auto" >
13
+ < Header title = "SOS Rio Grande do Sul" startAdornment = { < BurgerMenu /> } />
14
+ < div className = "flex flex-col gap-4 p-4 max-w-5xl pb-8 w-full" >
15
+ < h2 className = "text-4xl pt-4 font-semibold !text-zinc-900" >
16
+ Apoiadores do projeto
17
+ </ h2 >
18
+ < div className = "grid grid-cols-2 md:grid-cols-4 w-full gap-4 md:gap-8 mt-8" >
19
+ { supporters
20
+ . sort ( ( a , b ) => a . createdAt . localeCompare ( b . createdAt ) )
21
+ . map ( ( supporter , idx ) => (
22
+ < Link key = { idx } to = { supporter . link } >
23
+ < WithTooltip content = { supporter . name } >
24
+ < div className = "bg-white flex flex-col gap-2 w-full aspect-square p-4 justify-between shadow-sm rounded-md hover:border-text hover:cursor-pointer" >
25
+ < div
26
+ style = { {
27
+ backgroundImage : `url('${ supporter . imageUrl } ')` ,
28
+ } }
29
+ className = "flex-1 bg-center w-full bg-contain bg-no-repeat"
30
+ />
31
+ </ div >
32
+ </ WithTooltip >
33
+ </ Link >
34
+ ) ) }
35
+ </ div >
36
+ </ div >
37
+ </ div >
38
+ ) ;
39
+ } ;
40
+
41
+ export { Supporters } ;
Original file line number Diff line number Diff line change
1
+ import { Supporters } from './Supporters' ;
2
+
3
+ export { Supporters } ;
Original file line number Diff line number Diff line change 1
1
import { SignIn } from './SignIn' ;
2
-
3
2
import { Home } from './Home' ;
4
3
import { Shelter } from './Shelter' ;
5
4
import { EditShelterSupply } from './EditShelterSupply' ;
@@ -8,6 +7,7 @@ import { CreateShelter } from './CreateShelter';
8
7
import { UpdateShelter } from './UpdateShelter' ;
9
8
import { PrivacyPolicy } from './PrivacyPolicy' ;
10
9
import { AboutUs } from './AboutUs' ;
10
+ import { Supporters } from './Supporters' ;
11
11
12
12
export {
13
13
SignIn ,
@@ -19,4 +19,5 @@ export {
19
19
UpdateShelter ,
20
20
PrivacyPolicy ,
21
21
AboutUs ,
22
+ Supporters ,
22
23
} ;
You can’t perform that action at this time.
0 commit comments