diff --git a/packages/app/src/pages/callbacks/sync/spotify/index.jsx b/packages/app/src/pages/callbacks/sync/spotify/index.jsx new file mode 100644 index 00000000..0e5ba06d --- /dev/null +++ b/packages/app/src/pages/callbacks/sync/spotify/index.jsx @@ -0,0 +1,35 @@ +import React from "react" + +import * as antd from "antd" + +import SyncModel from "models/sync" + +export default (props) => { + const [error, setError] = React.useState(null) + + const makeSync = async () => { + const result = await SyncModel.spotifyCore.syncAuthCode(window.location.search.split("=")[1]).catch((err) => { + setError(err.message) + + return false + }) + + if (result) { + window.close() + } + } + + React.useEffect(() => { + makeSync() + }, []) + + if (error) { + return + } + + return

Please wait meanwhile we are syncing your Spotify account

+} \ No newline at end of file