-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: collocate common ui components into separate directories
- Loading branch information
1 parent
ad31e1f
commit f572f5a
Showing
9 changed files
with
68 additions
and
68 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
23 changes: 0 additions & 23 deletions
23
app/src/components/interfaces/dashboard/encode-dialog/EncodeDialogCommand.tsx
This file was deleted.
Oops, something went wrong.
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
23 changes: 23 additions & 0 deletions
23
app/src/components/interfaces/dashboard/encode-dialog/widgets/EncodeCommandWidget.tsx
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,23 @@ | ||
import type { EncodeCommandWidgetFragment$key } from '@/__generated__/EncodeCommandWidgetFragment.graphql' | ||
|
||
import { graphql, useFragment } from 'react-relay' | ||
|
||
import CodeBlock from '@/components/ui/code-block/CodeBlock' | ||
|
||
const FRAGMENT = graphql` | ||
fragment EncodeCommandWidgetFragment on Encode { | ||
command | ||
} | ||
` | ||
|
||
type EncodeCommandWidgetProps = { | ||
$key: EncodeCommandWidgetFragment$key | ||
} | ||
|
||
const EncodeCommandWidget: React.FC<EncodeCommandWidgetProps> = ({ $key }) => { | ||
const data = useFragment(FRAGMENT, $key) | ||
|
||
return <CodeBlock language="powershell">{data.command}</CodeBlock> | ||
} | ||
|
||
export default EncodeCommandWidget |
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