-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #67 from PotLock/feat/13-hero-banner
Feat: #13 - Hero banner & Top Content
- Loading branch information
Showing
83 changed files
with
1,969 additions
and
127 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
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 |
---|---|---|
|
@@ -129,4 +129,4 @@ | |
100% { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
} |
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,15 +1,20 @@ | ||
// import DonationsInfo from "@/modules/profile/components/DonationsInfo"; | ||
|
||
import Info from "@/modules/profile/components/Info"; | ||
import ProfileBanner from "@/modules/profile/components/ProfileBanner"; | ||
import ProjectBanner from "@/modules/project/components/ProjectBanner"; | ||
|
||
export default async function Project({ | ||
params, | ||
}: { | ||
params: { userId: string }; | ||
params: { userId: string; potId?: string }; | ||
}) { | ||
return ( | ||
<main className="flex flex-col"> | ||
<ProjectBanner projectId={params.userId} /> | ||
<ProfileBanner isProject={true} accountId={params.userId} /> | ||
<Info accountId={params.userId} /> | ||
{/* <DonationsInfo accountId={params.userId} potId={params.potId} /> */} | ||
</main> | ||
); | ||
} |
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
92 changes: 92 additions & 0 deletions
92
src/common/api/potlock/generated/hooks/useV1AccountsDonationsReceivedRetrieve.ts
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,92 @@ | ||
import client from "@kubb/swagger-client/client"; | ||
import useSWR from "swr"; | ||
import type { SWRConfiguration, SWRResponse } from "swr"; | ||
|
||
import type { | ||
V1AccountsDonationsReceivedRetrieve404, | ||
V1AccountsDonationsReceivedRetrieve500, | ||
V1AccountsDonationsReceivedRetrievePathParams, | ||
V1AccountsDonationsReceivedRetrieveQueryResponse, | ||
} from "../types/V1AccountsDonationsReceivedRetrieve"; | ||
import { v1AccountsDonationsReceivedRetrieveQueryResponseSchema } from "../zod/v1AccountsDonationsReceivedRetrieveSchema"; | ||
|
||
type V1AccountsDonationsReceivedRetrieveClient = typeof client< | ||
V1AccountsDonationsReceivedRetrieveQueryResponse, | ||
| V1AccountsDonationsReceivedRetrieve404 | ||
| V1AccountsDonationsReceivedRetrieve500, | ||
never | ||
>; | ||
type V1AccountsDonationsReceivedRetrieve = { | ||
data: V1AccountsDonationsReceivedRetrieveQueryResponse; | ||
error: | ||
| V1AccountsDonationsReceivedRetrieve404 | ||
| V1AccountsDonationsReceivedRetrieve500; | ||
request: never; | ||
pathParams: V1AccountsDonationsReceivedRetrievePathParams; | ||
queryParams: never; | ||
headerParams: never; | ||
response: V1AccountsDonationsReceivedRetrieveQueryResponse; | ||
client: { | ||
parameters: Partial< | ||
Parameters<V1AccountsDonationsReceivedRetrieveClient>[0] | ||
>; | ||
return: Awaited<ReturnType<V1AccountsDonationsReceivedRetrieveClient>>; | ||
}; | ||
}; | ||
export function v1AccountsDonationsReceivedRetrieveQueryOptions< | ||
TData = V1AccountsDonationsReceivedRetrieve["response"], | ||
>( | ||
accountId: V1AccountsDonationsReceivedRetrievePathParams["account_id"], | ||
options: V1AccountsDonationsReceivedRetrieve["client"]["parameters"] = {}, | ||
): SWRConfiguration<TData, V1AccountsDonationsReceivedRetrieve["error"]> { | ||
return { | ||
fetcher: async () => { | ||
const res = await client< | ||
TData, | ||
V1AccountsDonationsReceivedRetrieve["error"] | ||
>({ | ||
method: "get", | ||
url: `/api/v1/accounts/${accountId}/donations_received`, | ||
...options, | ||
}); | ||
return v1AccountsDonationsReceivedRetrieveQueryResponseSchema.parse( | ||
res.data, | ||
); | ||
}, | ||
}; | ||
} | ||
/** | ||
* @link /api/v1/accounts/:account_id/donations_received | ||
*/ | ||
export function useV1AccountsDonationsReceivedRetrieve< | ||
TData = V1AccountsDonationsReceivedRetrieve["response"], | ||
>( | ||
accountId: V1AccountsDonationsReceivedRetrievePathParams["account_id"], | ||
options?: { | ||
query?: SWRConfiguration< | ||
TData, | ||
V1AccountsDonationsReceivedRetrieve["error"] | ||
>; | ||
client?: V1AccountsDonationsReceivedRetrieve["client"]["parameters"]; | ||
shouldFetch?: boolean; | ||
}, | ||
): SWRResponse<TData, V1AccountsDonationsReceivedRetrieve["error"]> { | ||
const { | ||
query: queryOptions, | ||
client: clientOptions = {}, | ||
shouldFetch = true, | ||
} = options ?? {}; | ||
const url = `/api/v1/accounts/${accountId}/donations_received`; | ||
const query = useSWR< | ||
TData, | ||
V1AccountsDonationsReceivedRetrieve["error"], | ||
typeof url | null | ||
>(shouldFetch ? url : null, { | ||
...v1AccountsDonationsReceivedRetrieveQueryOptions<TData>( | ||
accountId, | ||
clientOptions, | ||
), | ||
...queryOptions, | ||
}); | ||
return query; | ||
} |
83 changes: 83 additions & 0 deletions
83
src/common/api/potlock/generated/hooks/useV1AccountsDonationsSentRetrieve.ts
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,83 @@ | ||
import client from "@kubb/swagger-client/client"; | ||
import useSWR from "swr"; | ||
import type { SWRConfiguration, SWRResponse } from "swr"; | ||
|
||
import type { | ||
V1AccountsDonationsSentRetrieve404, | ||
V1AccountsDonationsSentRetrieve500, | ||
V1AccountsDonationsSentRetrievePathParams, | ||
V1AccountsDonationsSentRetrieveQueryResponse, | ||
} from "../types/V1AccountsDonationsSentRetrieve"; | ||
import { v1AccountsDonationsSentRetrieveQueryResponseSchema } from "../zod/v1AccountsDonationsSentRetrieveSchema"; | ||
|
||
type V1AccountsDonationsSentRetrieveClient = typeof client< | ||
V1AccountsDonationsSentRetrieveQueryResponse, | ||
V1AccountsDonationsSentRetrieve404 | V1AccountsDonationsSentRetrieve500, | ||
never | ||
>; | ||
type V1AccountsDonationsSentRetrieve = { | ||
data: V1AccountsDonationsSentRetrieveQueryResponse; | ||
error: | ||
| V1AccountsDonationsSentRetrieve404 | ||
| V1AccountsDonationsSentRetrieve500; | ||
request: never; | ||
pathParams: V1AccountsDonationsSentRetrievePathParams; | ||
queryParams: never; | ||
headerParams: never; | ||
response: V1AccountsDonationsSentRetrieveQueryResponse; | ||
client: { | ||
parameters: Partial<Parameters<V1AccountsDonationsSentRetrieveClient>[0]>; | ||
return: Awaited<ReturnType<V1AccountsDonationsSentRetrieveClient>>; | ||
}; | ||
}; | ||
export function v1AccountsDonationsSentRetrieveQueryOptions< | ||
TData = V1AccountsDonationsSentRetrieve["response"], | ||
>( | ||
accountId: V1AccountsDonationsSentRetrievePathParams["account_id"], | ||
options: V1AccountsDonationsSentRetrieve["client"]["parameters"] = {}, | ||
): SWRConfiguration<TData, V1AccountsDonationsSentRetrieve["error"]> { | ||
return { | ||
fetcher: async () => { | ||
const res = await client<TData, V1AccountsDonationsSentRetrieve["error"]>( | ||
{ | ||
method: "get", | ||
url: `/api/v1/accounts/${accountId}/donations_sent`, | ||
...options, | ||
}, | ||
); | ||
return v1AccountsDonationsSentRetrieveQueryResponseSchema.parse(res.data); | ||
}, | ||
}; | ||
} | ||
/** | ||
* @link /api/v1/accounts/:account_id/donations_sent | ||
*/ | ||
export function useV1AccountsDonationsSentRetrieve< | ||
TData = V1AccountsDonationsSentRetrieve["response"], | ||
>( | ||
accountId: V1AccountsDonationsSentRetrievePathParams["account_id"], | ||
options?: { | ||
query?: SWRConfiguration<TData, V1AccountsDonationsSentRetrieve["error"]>; | ||
client?: V1AccountsDonationsSentRetrieve["client"]["parameters"]; | ||
shouldFetch?: boolean; | ||
}, | ||
): SWRResponse<TData, V1AccountsDonationsSentRetrieve["error"]> { | ||
const { | ||
query: queryOptions, | ||
client: clientOptions = {}, | ||
shouldFetch = true, | ||
} = options ?? {}; | ||
const url = `/api/v1/accounts/${accountId}/donations_sent`; | ||
const query = useSWR< | ||
TData, | ||
V1AccountsDonationsSentRetrieve["error"], | ||
typeof url | null | ||
>(shouldFetch ? url : null, { | ||
...v1AccountsDonationsSentRetrieveQueryOptions<TData>( | ||
accountId, | ||
clientOptions, | ||
), | ||
...queryOptions, | ||
}); | ||
return query; | ||
} |
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 +1 @@ | ||
{"type":"object","properties":{"id":{"description":"Donation id.","type":"integer","readOnly":true,"title":"Donation id"},"on_chain_id":{"description":"Donation id in contract","type":"integer","maximum":2147483647,"minimum":-2147483648,"title":"Contract donation id"},"total_amount":{"description":"Total amount.","type":"string","maxLength":64},"total_amount_usd":{"description":"Total amount in USD.","type":"string","format":"decimal","nullable":true,"pattern":"^-?\\d{0,18}(?:\\.\\d{0,2})?$","title":"Total amount in USD"},"net_amount":{"description":"Net amount.","type":"string","maxLength":64},"net_amount_usd":{"description":"Net amount in USD.","type":"string","format":"decimal","nullable":true,"pattern":"^-?\\d{0,18}(?:\\.\\d{0,2})?$","title":"Net amount in USD"},"matching_pool":{"description":"Matching pool.","type":"boolean"},"message":{"description":"Donation message.","type":"string","maxLength":1024,"nullable":true},"donated_at":{"description":"Donation date.","type":"string","format":"date-time"},"protocol_fee":{"description":"Protocol fee.","type":"string","maxLength":64},"protocol_fee_usd":{"description":"Protocol fee in USD.","type":"string","format":"decimal","nullable":true,"pattern":"^-?\\d{0,18}(?:\\.\\d{0,2})?$","title":"Protocol fee in USD"},"referrer_fee":{"description":"Referrer fee.","type":"string","maxLength":64,"nullable":true},"referrer_fee_usd":{"description":"Referrer fee in USD.","type":"string","format":"decimal","nullable":true,"pattern":"^-?\\d{0,18}(?:\\.\\d{0,2})?$","title":"Referrer fee in USD"},"chef_fee":{"description":"Chef fee.","type":"string","maxLength":64,"nullable":true},"chef_fee_usd":{"description":"Chef fee in USD.","type":"string","format":"decimal","nullable":true,"pattern":"^-?\\d{0,18}(?:\\.\\d{0,2})?$","title":"Chef fee in USD"},"tx_hash":{"description":"Transaction hash.","type":"string","maxLength":64,"title":"Transaction hash"},"donor":{"description":"Donor.","type":"string","title":"Address"},"ft":{"description":"Donation FT.","type":"string","title":"Address"},"pot":{"description":"Donation pot.","type":"string","nullable":true,"title":"Address"},"recipient":{"description":"Donation recipient.","type":"string","nullable":true,"title":"Address"},"referrer":{"description":"Donation referrer.","type":"string","nullable":true,"title":"Address"},"chef":{"description":"Donation chef.","type":"string","nullable":true,"title":"Address"}},"required":["donated_at","donor","ft","id","matching_pool","net_amount","on_chain_id","pot","protocol_fee","total_amount","tx_hash"],"x-readme-ref-name":"Donation"} | ||
{"type":"object","properties":{"id":{"description":"Donation id.","type":"integer","readOnly":true,"title":"Donation id"},"on_chain_id":{"description":"Donation id in contract","type":"integer","maximum":2147483647,"minimum":-2147483648,"title":"Contract donation id"},"total_amount":{"description":"Total amount.","type":"string","maxLength":64},"total_amount_usd":{"description":"Total amount in USD.","type":"string","format":"decimal","nullable":true,"pattern":"^-?\\d{0,18}(?:\\.\\d{0,2})?$","title":"Total amount in USD"},"net_amount":{"description":"Net amount.","type":"string","maxLength":64},"net_amount_usd":{"description":"Net amount in USD.","type":"string","format":"decimal","nullable":true,"pattern":"^-?\\d{0,18}(?:\\.\\d{0,2})?$","title":"Net amount in USD"},"matching_pool":{"description":"Matching pool.","type":"boolean"},"message":{"description":"Donation message.","type":"string","maxLength":1024,"nullable":true},"donated_at":{"description":"Donation date.","type":"string","format":"date-time"},"protocol_fee":{"description":"Protocol fee.","type":"string","maxLength":64},"protocol_fee_usd":{"description":"Protocol fee in USD.","type":"string","format":"decimal","nullable":true,"pattern":"^-?\\d{0,18}(?:\\.\\d{0,2})?$","title":"Protocol fee in USD"},"referrer_fee":{"description":"Referrer fee.","type":"string","maxLength":64,"nullable":true},"referrer_fee_usd":{"description":"Referrer fee in USD.","type":"string","format":"decimal","nullable":true,"pattern":"^-?\\d{0,18}(?:\\.\\d{0,2})?$","title":"Referrer fee in USD"},"chef_fee":{"description":"Chef fee.","type":"string","maxLength":64,"nullable":true},"chef_fee_usd":{"description":"Chef fee in USD.","type":"string","format":"decimal","nullable":true,"pattern":"^-?\\d{0,18}(?:\\.\\d{0,2})?$","title":"Chef fee in USD"},"tx_hash":{"description":"Transaction hash.","type":"string","maxLength":64,"nullable":true,"title":"Transaction hash"},"donor":{"description":"Donor.","type":"string","title":"Address"},"ft":{"description":"Donation FT.","type":"string","title":"Address"},"pot":{"description":"Donation pot.","type":"string","nullable":true,"title":"Address"},"recipient":{"description":"Donation recipient.","type":"string","nullable":true,"title":"Address"},"referrer":{"description":"Donation referrer.","type":"string","nullable":true,"title":"Address"},"chef":{"description":"Donation chef.","type":"string","nullable":true,"title":"Address"}},"required":["donated_at","donor","ft","id","matching_pool","net_amount","on_chain_id","pot","protocol_fee","total_amount"],"x-readme-ref-name":"Donation"} |
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 +1 @@ | ||
{"type":"object","properties":{"id":{"description":"List id.","type":"integer","maximum":2147483647,"minimum":0,"title":"List id"},"name":{"description":"List name.","type":"string","maxLength":64},"description":{"description":"List description.","type":"string","maxLength":256,"nullable":true},"cover_image_url":{"description":"Cover image url.","type":"string","format":"uri","maxLength":200,"nullable":true},"admin_only_registrations":{"description":"Admin only registrations.","type":"boolean"},"default_registration_status":{"description":"Default registration status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted","allOf":[{"description":"* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted","type":"string","enum":["Pending","Approved","Rejected","Graylisted","Blacklisted"],"x-readme-ref-name":"DefaultRegistrationStatusEnum"}]},"created_at":{"description":"List creation date.","type":"string","format":"date-time"},"updated_at":{"description":"List last update date.","type":"string","format":"date-time"},"owner":{"description":"List owner.","type":"string","title":"Address"},"admins":{"description":"List admins.","type":"array","items":{"type":"string","title":"Address"}}},"required":["admin_only_registrations","admins","created_at","default_registration_status","id","name","owner","updated_at"],"x-readme-ref-name":"List"} | ||
{"type":"object","properties":{"id":{"description":"List ID in DB (does not necessarily correspond to on-chain ID).","type":"integer","readOnly":true,"title":"List id"},"on_chain_id":{"description":"List ID in contract","type":"integer","maximum":2147483647,"minimum":-2147483648,"title":"Contract list ID"},"name":{"description":"List name.","type":"string","maxLength":64},"description":{"description":"List description.","type":"string","maxLength":256,"nullable":true},"cover_image_url":{"description":"Cover image url.","type":"string","format":"uri","maxLength":200,"nullable":true},"admin_only_registrations":{"description":"Admin only registrations.","type":"boolean"},"default_registration_status":{"description":"Default registration status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted","allOf":[{"description":"* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted","type":"string","enum":["Pending","Approved","Rejected","Graylisted","Blacklisted"],"x-readme-ref-name":"DefaultRegistrationStatusEnum"}]},"created_at":{"description":"List creation date.","type":"string","format":"date-time"},"updated_at":{"description":"List last update date.","type":"string","format":"date-time"},"owner":{"description":"List owner.","type":"string","title":"Address"},"admins":{"description":"List admins.","type":"array","items":{"type":"string","title":"Address"}}},"required":["admin_only_registrations","admins","created_at","default_registration_status","id","name","on_chain_id","owner","updated_at"],"x-readme-ref-name":"List"} |
Oops, something went wrong.