President Donald J. Trump said Thursday that Tim Cook, the former chief executive of Apple, should become the next chief executive of Nvidia after Jensen Huang resigned from the chipmaker.

“NOW THAT Nvidia CEO JENSEN HUANG, who has done a fantastic job, has resigned, there is only one man to take his place - TIM COOK of Apple. A Legend replaces a Legend!” the president wrote on Truth Social at about 10:29 a.m. Eastern time.

Nvidia’s board announced Thursday that Huang had resigned as president, chief executive and a member of the board, effective immediately. The company named Colette Kress, its executive vice president and chief financial officer, as interim chief executive and said it would consider internal and external candidates for the permanent role. Harvey C. Jones was appointed the board’s first chair.

Huang’s departure followed reports of an extramarital affair with a Chinese businesswoman whom U.S. authorities suspect of spying for Beijing, as well as a reported relationship with a senior Nvidia executive, according to Reuters and the Associated Press. Nvidia did not give a reason for the resignation in its announcement.

Cook stepped down as Apple’s chief executive in September after about 15 years in the role and remains the company’s executive chairman, Reuters reported. Apple and Cook did not immediately respond to requests for comment, according to Reuters.