Skip to content

Commit

Permalink
fetch publish types for each project
Browse files Browse the repository at this point in the history
  • Loading branch information
benbrown committed May 14, 2021
1 parent 48d2167 commit 62e891c
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ type PublishTargetsProps = {
export const PublishTargets: React.FC<PublishTargetsProps> = (props) => {
const { projectId, scrollToSectionId = '' } = props;
const { publishTargets } = useRecoilValue(settingsState(projectId));
const { setPublishTargets } = useRecoilValue(dispatcherState);
const { getPublishTargetTypes, setPublishTargets } = useRecoilValue(dispatcherState);
const publishTypes = useRecoilValue(publishTypesState(projectId));

const [showPublishDialog, setShowingPublishDialog] = useState(false);
Expand All @@ -75,6 +75,12 @@ export const PublishTargets: React.FC<PublishTargetsProps> = (props) => {

const { location } = useLocation();

useEffect(() => {
if (projectId) {
getPublishTargetTypes(projectId);
}
}, [projectId]);

useEffect(() => {
if (location.hash === '#completePublishProfile') {
if (publishTargets && publishTargets.length > 0) {
Expand Down

0 comments on commit 62e891c

Please sign in to comment.