Skip to content

Commit 2cf0e87

Browse files
fixing type and moving texts
1 parent 735a85c commit 2cf0e87

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

public/locales/en.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,8 @@
518518
"nameTitle": "Name",
519519
"intervalTitle": "Interval",
520520
"specTitle": "Spec",
521-
"branchTitle": "Branch"
521+
"branchTitle": "Branch",
522+
"gitRepositoryCreated": "Git Repository created successfully",
523+
"gitRepositoryCreationFailed": "Failed to create Git Repository: {{error}}"
522524
}
523525
}

src/hooks/useCreateGitRepository.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ export const useCreateGitRepository = (namespace: string = 'default') => {
4040

4141
await fetchApiServerJson(path, apiConfig, undefined, 'POST', JSON.stringify(payload));
4242

43-
toast.show(t('flux.gitRepositoryCreated', 'Git Repository created successfully'));
43+
toast.show(t('CreateGitRepositoryDialog.gitRepositoryCreated'));
4444
} catch (error) {
4545
toast.show(
46-
t('flux.gitRepositoryCreationFailed', 'Failed to create Git Repository: {{error}}', {
46+
t('CreateGitRepositoryDialog.gitRepositoryCreationFailed', {
4747
error: error instanceof Error ? error.message : 'Unknown error',
4848
}),
4949
);

src/lib/api/types/flux/createGitRepository.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Resource } from '../resource';
22

3-
export interface CreateGitRepositoryType {
3+
export type CreateGitRepositoryType = {
44
apiVersion: 'source.toolkit.fluxcd.io/v1';
55
kind: 'GitRepository';
66
metadata: {
@@ -17,7 +17,7 @@ export interface CreateGitRepositoryType {
1717
name: string;
1818
};
1919
};
20-
}
20+
};
2121

2222
export const CreateGitRepositoryResource = (namespace: string, name: string): Resource<CreateGitRepositoryType> => ({
2323
path: `/apis/source.toolkit.fluxcd.io/v1/namespaces/${namespace}/gitrepositories/${name}`,

0 commit comments

Comments
 (0)