Skip to content

Commit

Permalink
wip: オプションを指定できるように
Browse files Browse the repository at this point in the history
  • Loading branch information
su-u committed Dec 31, 2023
1 parent 9c5ef44 commit a15dd1c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/app/dummy_generator/fakcer.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { DataType , nameType , nameDataType , addressType } from '@/app/dummy_generator/options';

type Option = undefined | nameType | nameDataType | addressType;

export const facker = (dataType: DataType, option: Option) => {
switch (dataType) {
case 'name': {
return nameFacker(option as nameType);
}
default:
break;

}

return [];
};

const nameFacker = (option: nameType) => {

};
6 changes: 6 additions & 0 deletions src/app/dummy_generator/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ export const nameOptions = [
},
] as const;

export type nameType = (typeof nameOptions)[number]['value'];

export const nameDataOptions = [
{
label: '漢字',
Expand All @@ -105,6 +107,8 @@ export const nameDataOptions = [
},
] as const;

export type nameDataType = (typeof nameDataOptions)[number]['value'];

export const addressOptions = [
{
label: 'フル',
Expand All @@ -131,3 +135,5 @@ export const addressOptions = [
value: 'gou',
},
] as const;

export type addressType = (typeof addressOptions)[number]['value'];

1 comment on commit a15dd1c

@vercel
Copy link

@vercel vercel bot commented on a15dd1c Dec 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

tools-su-u-dev – ./

tools-su-u-dev-su-u.vercel.app
tools-su-u-dev.vercel.app
tools-su-u-dev-git-main-su-u.vercel.app
tools.su-u.dev

Please sign in to comment.