import FileChooserButton from 'src/components/shared/FileChooserButton'; import { Opt } from 'src/lib/option'; import Wallpaper from 'src/services/Wallpaper'; export const WallpaperInputter = ({ opt, }: WallpaperInputterProps): JSX.Element => { if (typeof opt.get() === 'string') { return ( { const newValue: string = self.get_uri()!.replace('file://', ''); opt.set(newValue as T); if (options.wallpaper.enable.get()) { Wallpaper.setWallpaper(newValue); } }} /> ); } return ; }; interface WallpaperInputterProps { opt: Opt; }