@igamingcareer/igaming-components 1.0.83 → 1.0.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +41 -0
- package/dist/index.js +81 -81
- package/dist/index.mjs +3030 -3003
- package/package.json +1 -1
package/Readme.md
CHANGED
|
@@ -181,6 +181,47 @@ export function SaveCompaniesExample({ company }: { company: Company }) {
|
|
|
181
181
|
|
|
182
182
|
Use `saveDisabled` to disable the action for unauthenticated users, and keep `isSaved` in sync with your data source.
|
|
183
183
|
|
|
184
|
+
## Claim company CTA (CompanyClaim)
|
|
185
|
+
|
|
186
|
+
Use the `CompanyClaim` component to render a minimal “Claim this company” CTA. It is fully controlled by props and emits a click event upward without any auth or API logic.
|
|
187
|
+
|
|
188
|
+
```tsx
|
|
189
|
+
import { CompanyClaim } from "@igamingcareer/igaming-components";
|
|
190
|
+
|
|
191
|
+
export function CompanyClaimExample({ company, canClaim }: { company: Company; canClaim: boolean }) {
|
|
192
|
+
const handleClaimClick = () => {
|
|
193
|
+
// optional: analytics or open your claim flow
|
|
194
|
+
console.log("claim company", { companyId: company.id });
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
return (
|
|
198
|
+
<CompanyClaim
|
|
199
|
+
isClaimed={company.claimedStatus === "claimed"}
|
|
200
|
+
canClaim={canClaim}
|
|
201
|
+
onClaimClick={handleClaimClick}
|
|
202
|
+
/>
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Claim profile dialog submissions (CompanyDetail)
|
|
208
|
+
|
|
209
|
+
When the claim dialog is submitted from `CompanyDetail`, the component emits a structured payload so your app can handle the request outside the library.
|
|
210
|
+
|
|
211
|
+
```tsx
|
|
212
|
+
import { CompanyDetail } from "@igamingcareer/igaming-components";
|
|
213
|
+
import type { CompanyClaimRequestPayload } from "@igamingcareer/igaming-components";
|
|
214
|
+
|
|
215
|
+
export function CompanyDetailWithClaim({ company }: { company: Company }) {
|
|
216
|
+
const handleClaimSubmit = (payload: CompanyClaimRequestPayload) => {
|
|
217
|
+
// send to your API or analytics
|
|
218
|
+
console.log("claim submit", payload);
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
return <CompanyDetail company={company} onClaimSubmit={handleClaimSubmit} />;
|
|
222
|
+
}
|
|
223
|
+
```
|
|
224
|
+
|
|
184
225
|
## CV upload from the dashboard
|
|
185
226
|
|
|
186
227
|
The dashboard emits CV upload events so the host application can upload, store,
|